<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 字符串方法 </title>
</head>
<body>
<p>indexOf() 方法接受第二个参数作为搜索的起始位置：</p>

<p id="demo"></p>

<script>
  var str = "The full name of China is the People's Republic of China.";
  var pos = str.indexOf("China",18);
  document.getElementById("demo").innerHTML = pos;
</script>

</body>
</html>

<!--从18位开始找 即h，继续向后数19.20.21...51到C 即找到China-->